{% extends "master.html" %}
{% block subtitle %} - 调拨管理 - 调拨单详情 {% endblock %}

{% block main %}
<div class="container">
    <div class="row">
        <ol class="breadcrumb">
          <li><a href="{{url_for('bpRoot.view')}}">主面板</a></li>
          <li><a href="{{url_for('bpTns.view')}}">调拨管理</a></li>
          <li class="active">调拨单详情</li>
        </ol>
    </div>
    <div class="row">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#">调拨单详情</a></li>
      <li><a href="{{url_for('.view',action='viewLog',id=obj.id)}}">日志记录</a></li>
    </ul>
    </div>
    <div class="row">
        <div class="btn-toolbar pull-right">
            {% if obj.editable() %}
                <div class="btn-group"><a class="btn btn-default" type="button" href="{{url_for('bpTns.view',action='update',id=obj.id)}}">{{BTN_UPDATE}}</a></div>
            {% endif %}
            {% if obj.approvable() %}
                <div class="btn-group"><a class="btn btn-primary" href="{{url_for('bpTns.view',action='app',id=obj.id,sts=TNS_SND_AP)}}">{{BTN_ACCEPT}}</a></div>
            {% endif %}
            {% if obj.deletable() %}
                <div class="btn-group"><a class="btn btn-dange" href="{{url_for('bpTns.view',action='delete',id=obj.id)}}">{{BTN_DELETE}}</a></div>
            {% endif %}
        </div>
    </div>
    <div class="row">
        <fieldset>
            <legend>调拨单详情</legend>
            <div class="col-md-4">
                <h4>系统编号</h4><p>{{obj.no}}&nbsp;</p>
                <h4>从店铺</h4><p>{{obj.sShop}}&nbsp;</p>
                <h4>调拨到</h4><p>{{obj.dShop}}&nbsp;</p>
                <h4>送货单号</h4><p>{{obj.awb|f}}&nbsp;</p>
            </div>
            <div class="col-md-4">
                <h4>预计送达日期</h4><p>{{obj.expectDate|fd}}&nbsp;</p>
                <h4>经办人</h4><p>{{obj.createBy}}&nbsp;</p>
                <h4>开单时间</h4><p>{{obj.createTime|fd}}&nbsp;</p>
            </div>
            <div class="col-md-4">
                <h4>费用</h4><p>{{obj.fee}}&nbsp;</p>
                <h4>备注</h4><p>{{obj.remark|f}}&nbsp;</p>
                <h4>状态</h4><p>{{obj.status|ss(c='TNS')}}&nbsp;</p>                
            </div>
            <div class="col-md-12">   
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <td class="col-md-3">商品编号</td>
                            <td>商品名称</td>
                            <td>商品描述</td>
                            <td class="col-md-2">所在仓位</td>
                            <td class="col-md-1">调拨数量</td>
                            <td class="col-md-2">备注</td>
                        </tr>
                    </thead>
                    <tbody>
                        {% for dtl in obj.dtls %}
                            <tr>
                                <td>{{mymacros.render_goto_popup_pdt(dtl.pdt, loop.first)}}</td>
                                <td>{{dtl.pdtname}}</td>
                                <td>{{dtl.pdtfulldesc}}</td>
                                <td>{{dtl.sIvtLtn}}</td>
                                <td>{{dtl.qty}}</td>
                                <td>{{dtl.remark|f}}</td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </fieldset>
        {{mymacros.render_system_info(obj)}}
    </div>

</div>
{% endblock %}